<template>
  <div id="cRadioGroup">
    <el-radio v-for="(obj,index) in options" :key="index" v-model="value" :label="index">{{obj}}</el-radio>
  </div>
</template>

<script>
export default {
  props: {
    value: {
      type: Number,
      default: -1,
    },
    options: {
      type: Array,
    },
  },
  watch: {
    value: {
      handler(newValue) {
        this.$emit('input', newValue)
      },
      immediate: true,
    },
  },
}
</script>

<style lang="scss" scoped>
#cRadioGroup {
  width: 100%;
  height: 50px;
  border: 1px solid black;

  .item {
    padding-right: 10px;
  }
}
</style>

